var XmlHttpReq=false ;
var obj1; var city=false;


function createXmlHttpRequest()
{ 
XmlHttpReq=new ActiveXObject("Msxml2.XMLHTTP");
} 
function processResponse()
{ 
if(XmlHttpReq.readyState == 4)
{ 
if(XmlHttpReq.status == 200)
{ 

document.getElementById(obj1).innerHTML=XmlHttpReq.responseText;
 }
 }
} 
function countClick(o)
{
createXmlHttpRequest();
XmlHttpReq.open("post","http://bj.o.cn/adPage.jspa?_flowId=adClick&id="+o,true); 
XmlHttpReq.send(); 
}
function sendRequest(o)
{
createXmlHttpRequest(); 
var p=new Array();
p=o.split(":");
XmlHttpReq.open("post","http://bj.o.cn/adPage.jspa?_flowId=showAd&id="+p[1]+"&old="+obj1+"&city="+getMap(),false);
XmlHttpReq.onreadystatechange =processResponse;
XmlHttpReq.send();
} 
function processResponse()
{ 
if(XmlHttpReq.readyState == 4)
{ 
if(XmlHttpReq.status == 200)
{ 

 var s=XmlHttpReq.responseText;
// if(s.indexOf("</a>")!=-1){
//    document.getElementById(obj1).innerHTML=s; 
// }else{
//    eval(s);
// }
  
}
} 
}
function processLoad(o){
  var page=new Array(); 
  page=o.split(',');
  for(var i=0;i<page.length;i++)
  {
   obj1=page[i];
   sendRequest(page[i]); 
  }
  }
  
function changePosition(c,s){ 
    obj1=s;
    sendRequest(c); 

} 

  
  